<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@page isELIgnored="false"%>
<!DOCTYPE HTML>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'look.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script src="jquery-3.3.1\jquery-3.3.1.js"></script>
	<link rel="stylesheet" type="text/css" href="css/look.css">
 <script>
 	var $j = jQuery.noConflict();
 	
 	function xs(room,time) {
 		var a=1; 
   		$j(document).ready(function () {
   		$j("div[class=\"xianshitupian\"]").empty();
   		while(a<=${zps})
   		{
   		console.log(room);
   		//此处的room应该从网页上获取，届时，网页上会有一个标明现在是哪个房间的标记
	 		var txt2 = $j(" <div class=\"shexiang\"><img alt=\""+room+time+"\" src=\"monitor/"+room+"/"+time+"/"+time+"_"+a+".jpg\"></div>");   // 以 jQuery 创建新元素
			//删除被选元素子元素
			
			$j("div[class=\"xianshitupian\"]").append(txt2);
			a++;
		}
		a=1;
 		})
	}
	$j(document).ready(function(){
	 	$j("#xianshi").click(function () {
	 		console.log("lala");
	 		xs("20205","2018_03_12");
	    });
	});
 </script>
  </head>
  <!--$("#imageId").attr("src","xxxx.jpg");-->
 
  <body>
  <button id="xianshi" type="button">2018_03_12</button>
  <div class="xianshikuang">
    <div class="xianshitupian" id="zhanshi">
    </div>
   </div>
  </body>
</html>
